﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using V5_BLL;
using V5_EShop._Class.Common;
using V5_EShop._Class.Data;

namespace V5_EShop.Controllers {
    public class BaseController : Controller {
        public BaseController() {
            var model = new BLLConfig().GetModel();
            this.ViewData["config"] = model;
            var site = new {
                dir = "/",
                theme_dir = @"/templates/" + SiteHelper.TemplateDir + "/shared/",
                res_dir = "/wwwroot/",
                key = model.SiteKeywords,
                des = model.SiteDescription,
                now = DateTime.Now
            };

            ViewData["site"] = site;

            ViewData["url"] = new {
                index = "/"
            };

            ViewData["loop"] = LoopHelper.Instance;
        }

    }
}